package com.nana.petadventure.ui.map
{
	import com.nana.framework.ui.PSprite;
	import com.nana.petadventure.app.AppControllerList;
	import com.nana.petadventure.utils.ui.ButtonUtil;
	
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.DisplayObject;
	import flash.display.SimpleButton;
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	
	public class MapView extends PSprite
	{
		private var _mapSprite:Sprite;	//mapSprite and ui
		private var _mapBgBitmap:Bitmap;
		private var _nameArr:Array;
		private var _namePointArr:Array;
		
		public function MapView()
		{
			super();
			// to delete
			LEVEL_00.addEventListener(MouseEvent.CLICK,levelOnClick);
		}
		
		private function initView():void {
			_mapSprite = new Sprite;
			if(_mapBgBitmap == null) {
				_mapBgBitmap = new Bitmap();
			}
			this.addChildAt(_mapBgBitmap,0);
			this.addChild(_mapSprite);
		}
		
//		private function createStageIcon():void {
//			var stageIcon:StageIconButton;
//			for (var i:int = 0; i < _nameArr.length; i++) {
//				stageIcon = ButtonUtil.stageIconButton()
//			}
//		}
		
		private function initStageChoiceListener():void {
			var stageIcon:SimpleButton;
			
		}
		
		private function levelOnClick(event:MouseEvent):void {
			var stageIcon:DisplayObject = event.currentTarget as DisplayObject;
			AppControllerList.getInstance().sceneController.init();
			AppControllerList.getInstance().mapController.dismissMapView();
		}
		
		public function destroy():void {
			this.removeAllChildren();
		}
	}
}